﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace WebFetch
{
    public class EngineState
    {
        /*
         * Dictionary
            +----+  +---------------+
            |enum|  | list<string>  |
            +----+  +---------------+

            +----+  +---------------+
            |enum|  | list<string>  |
            +----+  +---------------+

            +----+  +---------------+
            |enum|  | list<string>  |
            +----+  +---------------+
         * */
        private List<string> cUrl = new List<string>();
        private List<string> forbitURL = new List<string>();
        private List<string> urlString = new List<string>();

        private List<int> fileHash = new List<int>();

        private string currentDomain;

        private Dictionary<string, Stack<string>> messageQueue = new Dictionary<string, Stack<string>>();

        string mainCharset = "UTF-8";

        public EngineState()
        {
            urlString.Add("http://www.aisex.com/bt");
            urlString.Add("http://www.smh.com.au");
            urlString.Add("http://www.bbc.co.uk");
            urlString.Add("http://www.bbc.com");
            urlString.Add("http://www.google.com.au/");
            urlString.Add("http://www.dict.org/bin/Dict?Form=Dict2&Database=*&Query=develop");
            urlString.Add("http://news.163.com/");
            urlString.Add("http://dict.cn/mauling");
            urlString.Add("http://www.dict.org/bin/Dict?Form=Dict2&Database=*&Query=develop");
            forbitURL.Add("www.jandown.com");
            BackupURL = new List<string>();
        }

        public Dictionary<string, Stack<string>> MessageQueue
        {
            get { return messageQueue; }
            set { messageQueue = value; }
        }

        public string CurrentDomain
        {
            get { return currentDomain; }
            set { currentDomain = value; }
        }

        public List<string> CUrl
        {
            get { return cUrl; }
            set { cUrl = value; }
        }

        public List<string> ForbitURL
        {
            get { return forbitURL; }
            set { forbitURL = value; }
        }

        public List<string> UrlString
        {
            get { return urlString; }
            set { urlString = value; }
        }

        public List<int> FileHash
        {
            get { return fileHash; }
            set { fileHash = value; }
        }

        public string MainCharset
        {
            get { return mainCharset; }
            set { mainCharset = value; }
        }

        /// <summary>
        /// push the Back up URL.
        /// </summary>
        public List<string> BackupURL
        {
            get;
            set;
        }

    }
}
